<script>
export default {
	name: 'MySwitch',
	props: {
		modelValue: Number,
	},
	emits: ['update:modelValue'],
	setup(props, { emit }) {
		const switchValue = computed({
			get: () => props.modelValue,
			set: () => {},
		});
		return {
			switchValue,
			change(val) {
				emit('update:modelValue', val);
			},
		};
	},
};
</script>
<template>
	<el-switch v-model="switchValue" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" @change="change"></el-switch>
</template>
